home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
NDXCOMP.TAS
< prev
next >
Wrap
Text File
|
1991-06-25
|
3KB
|
134 lines
{
This script looks at short term performance of your stocks, only
5 days, and compares that performance to an index. In this script
the index is the SP-500. You can change the time of perfomance by
changing the Max_Quotes feild and you can change the index to any
index or stock you want by changing SP-500 in the index feild. At
the summary you will see the 5 and worst perfomers in your ticker
Written by Jerry Green on a suggestion by Martin Moore. Any errors
in the script are mine. April 1991.
}
#MAX_QUOTES 5
#INDEX 'SP-500'
#OUTPUT_FILE 'NDXCOMP.LST+'
tk_total : number;
sg_stks : number;
IPF := ((INDEX/INDEX[1])-1)*100;
TPF := ((C/C[1])-1)*100; { Calculate perfomance of ticker}
begin
if TPF > IPF then
sg_stks = sg_stks +1;
tk_total = tk_total +1;
end
if TPF < zs then { search for poor performers}
begin
vs = ws;
vst = wst;
ws = xs;
wst = xst;
xs = ys;
xst = yst;
ys = zs;
yst = zst;
zs = TPF;
zst = ticker;
end
if TPF > zs and TPF < ys then
begin
vs = ws;
vst = wst;
ws = xs;
wst = xst;
xs = ys;
xst = yst;
ys = TPF;
yst = ticker;
end
if TPF > ys and TPF < xs then
begin
vs = ws;
vst = wst;
ws = xs;
wst = xst;
xs = TPF;
xst = ticker;
end
if TPF > xs and TPF < ws then
begin
vs = ws;
vst = wst;
ws = TPF;
wst = ticker;
end
if TPF > ws and TPF < vs then
begin
vs = TPF;
vst = ticker;
end { end poor performers search}
if TPF > as then { search for good performers}
begin
es = ds;
est = dst;
ds = cs;
dst = cst;
cs = bs;
cst = bst;
bs = as;
bst = ast;
as = TPF;
ast = ticker;
end
if TPF < as and TPF > bs then
begin
es = ds;
est = dst;
ds = cs;
dst = cst;
cs = bs;
cst = bst;
bs = TPF;
bst = ticker;
end
if TPF < bs and TPF > cs then
begin
es = ds;
est = dst;
ds = cs;
dst = cst;
cs = TPF;
cst = ticker;
end
if TPF < cs and TPF > ds then
begin
es = ds;
est = dst;
ds = TPF;
dst = ticker;
end
if TPF < ds and TPF > es then
begin
es = TPF;
est = ticker;
end
if last_ticker then
begin
t = (int(tk_total));
s = (int(sg_stks));
px = (s/t)*100;
writeln('\n\n----------------------SUMMARY----------------------');
writeln(t,' Tickers with ',s,' > than index at ',px,'%');
writeln( )
writeln(' Ticker %')
writeln('***',' ',zst,' ',zs,'%',' These are the five worst')
writeln('***',' ',yst,' ',ys,'%',' performers in your list.')
writeln('***',' ',xst,' ',xs,'%',' This is based on how they')
writeln('***',' ',wst,' ',ws,'%',' have performed in the last')
writeln('***',' ',vst,' ',vs,'%',' five days.')
writeln(' ')
writeln('***',' ',ast,' ',as,'%',' These are the five best ')
writeln('***',' ',bst,' ',bs,'%',' performers in your list. ')
writeln('***',' ',cst,' ',cs,'%',' Please check the stock ')
writeln('***',' ',dst,' ',ds,'%',' and data for stock splits ')
writeln('***',' ',est,' ',es,'%',' and/or errors before action. ')
end;